function [GG, RR, CONS, eu, SDX, ZZ, initss, ssvec, flag, ssnames,ny,nx,nz,stanames,shonames]=lmj_modfeval(funcmod,param,options,addsol) 
% =========================================================================
% function [GG, RR, CONS, eu, SDX, ZZ, initss, ssvec, flag, ssnames,ny,nx,nz]...
% =lmj_modfeval(feval,param,options,addsol) 
% Call the m-file indicated in FEVAL to solve model 
% OPTIONS is additional input for Non-Linear Solver 
% ADDSOL  is an additional input for the solution in general 
% =========================================================================
nz=[]; 
ny=[]; 
nx=[]; 
[GG, RR, CONS, eu, SDX, ZZ, initss, ssvec, flag, ssnames,stanames,shonames]=feval(funcmod,param,options,addsol);
% --------------
% 1. SS analysis 
% --------------
switch flag.ssok
    case -2
        disp('No SS solution')
        return
    case -1
        disp('Multiple SS Solutions')
        return
    case 0
        printcell([ssnames num2cprec(ssvec(:,1))]);
        disp('Unique solution but OMEGALOW < 0')
        return
        
    case 1
        if ~isempty(ssnames)
            printcell([ssnames num2cprec(ssvec(:,1))]);
            if flag.solver==1
                disp('SS Solved with FZERO');
            elseif flag.solver==2
                disp('SS Solved with FSOLVE');
            else
                error('SS Solved but did not record solver')
            end
        end 
end
% ------------------------------
% 2. Linearization analysis 
% ------------------------------
if flag.euok==0
    %     if isequal(eu(:),[0;0])
    %         disp('No Solution');
    %     else
    %         disp('Indeterminacy');
    %     end
    %
    disp('No unique RE solution')
else    
    disp('Unique RE solution'); 
    ny=size(GG,1);
    nx=size(RR,2);
    if size(SDX,2)~=nx
        error('Size SDX does not match number of shocks')
    end
    nz=size(ZZ,1);
    fprintf('Number of states        = %-.0f\n',ny);
    fprintf('Number of shocks        = %-.0f\n',nx);
    fprintf('Number of obsservables  = %-.0f\n',nz);
end 